<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_uart.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a> &#124;
<a href="#var-members">变量</a>  </div>
  <div class="headertitle"><div class="title">dev_uart.c 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>调试日志串口打印  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="dev__uart_8h_source.html">dev_uart.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="version_8h_source.html">version.h</a>&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
dev_uart.c 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__uart_8c" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__uart_8c" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__uart_8c">
<area shape="rect" title="调试日志串口打印" alt="" coords="5,5,268,60"/>
<area shape="rect" href="dev__uart_8h.html" title="调试日志串口打印" alt="" coords="45,108,127,133"/>
<area shape="rect" href="version_8h.html" title="版本/目标控制" alt="" coords="151,108,224,133"/>
<area shape="rect" title=" " alt="" coords="43,181,129,207"/>
</map>
</div>
</div>
<p><a href="dev__uart_8c_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a33047df92b9014ff5cb2536417f22ed3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">DEBUG_UART_X</a>&#160;&#160;&#160;UART0</td></tr>
<tr class="memdesc:a33047df92b9014ff5cb2536417f22ed3"><td class="mdescLeft">&#160;</td><td class="mdescRight">用作调试日志打印的串口号  <a href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">更多...</a><br /></td></tr>
<tr class="separator:a33047df92b9014ff5cb2536417f22ed3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae74f99a4e9fcb1f759bef9a73b0bf091"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#ae74f99a4e9fcb1f759bef9a73b0bf091">DEBUG_UART_BAUD</a>&#160;&#160;&#160;57600</td></tr>
<tr class="memdesc:ae74f99a4e9fcb1f759bef9a73b0bf091"><td class="mdescLeft">&#160;</td><td class="mdescRight">用作调试日志打印的串口波特率（data-8, stop-1, no parity）  <a href="dev__uart_8c.html#ae74f99a4e9fcb1f759bef9a73b0bf091">更多...</a><br /></td></tr>
<tr class="separator:ae74f99a4e9fcb1f759bef9a73b0bf091"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afdd0a75ca080e0e09d20841e7d1d0ea0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#afdd0a75ca080e0e09d20841e7d1d0ea0">KEY_INPUT_GPIO</a>&#160;&#160;&#160;GPIOD</td></tr>
<tr class="separator:afdd0a75ca080e0e09d20841e7d1d0ea0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae95dbd4884384af5f7a5f705586b21ad"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#ae95dbd4884384af5f7a5f705586b21ad">KEY_INPUT_PIN</a>&#160;&#160;&#160;PIN2</td></tr>
<tr class="separator:ae95dbd4884384af5f7a5f705586b21ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac040eb6679fed6e591776425aa7abd9d"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#ac040eb6679fed6e591776425aa7abd9d">PUTCHAR_PROTOTYPE</a>&#160;&#160;&#160;int fputc(int <a class="el" href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a>, FILE *f)</td></tr>
<tr class="separator:ac040eb6679fed6e591776425aa7abd9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:ac12e742cf904e08383401dd68a88001b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#ac12e742cf904e08383401dd68a88001b">uart_port_switch</a> (void)</td></tr>
<tr class="memdesc:ac12e742cf904e08383401dd68a88001b"><td class="mdescLeft">&#160;</td><td class="mdescRight">串口（SWD）端口功能切换  <a href="dev__uart_8c.html#ac12e742cf904e08383401dd68a88001b">更多...</a><br /></td></tr>
<tr class="separator:ac12e742cf904e08383401dd68a88001b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadbe4996756dcc6199bc9ec2e4969993"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#aadbe4996756dcc6199bc9ec2e4969993">uart_debug_port_init</a> (void)</td></tr>
<tr class="memdesc:aadbe4996756dcc6199bc9ec2e4969993"><td class="mdescLeft">&#160;</td><td class="mdescRight">配置串口打印调试日志的端口  <a href="dev__uart_8c.html#aadbe4996756dcc6199bc9ec2e4969993">更多...</a><br /></td></tr>
<tr class="separator:aadbe4996756dcc6199bc9ec2e4969993"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd092ef1d390fe16bc90e101bbbca1d8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#afd092ef1d390fe16bc90e101bbbca1d8">uart_debug_init</a> (void)</td></tr>
<tr class="memdesc:afd092ef1d390fe16bc90e101bbbca1d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化用作打印调试日志的串口  <a href="dev__uart_8c.html#afd092ef1d390fe16bc90e101bbbca1d8">更多...</a><br /></td></tr>
<tr class="separator:afd092ef1d390fe16bc90e101bbbca1d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21296d9c26b359559c9c6c65a7cb1151"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a21296d9c26b359559c9c6c65a7cb1151">uart_send_msg</a> (UART_TypeDef *uart_x, const uint8_t *src_buf, const uint32_t num_bytes)</td></tr>
<tr class="memdesc:a21296d9c26b359559c9c6c65a7cb1151"><td class="mdescLeft">&#160;</td><td class="mdescRight">串口发送数据  <a href="dev__uart_8c.html#a21296d9c26b359559c9c6c65a7cb1151">更多...</a><br /></td></tr>
<tr class="separator:a21296d9c26b359559c9c6c65a7cb1151"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89bad4750e10db3e5de90c026aaa01ef"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a89bad4750e10db3e5de90c026aaa01ef">__asm</a> (&quot;.global __use_no_semihosting\n\t&quot;)</td></tr>
<tr class="memdesc:a89bad4750e10db3e5de90c026aaa01ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">不使用 MicroLIB 时避免使用半主机模式  <a href="dev__uart_8c.html#a89bad4750e10db3e5de90c026aaa01ef">更多...</a><br /></td></tr>
<tr class="separator:a89bad4750e10db3e5de90c026aaa01ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a123aeac44456d49a7687b2111946f357"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a123aeac44456d49a7687b2111946f357">_sys_exit</a> (int x)</td></tr>
<tr class="separator:a123aeac44456d49a7687b2111946f357"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1647e9479b4be5731d79c81af76826c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a1647e9479b4be5731d79c81af76826c5">_ttywrch</a> (int <a class="el" href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a>)</td></tr>
<tr class="separator:a1647e9479b4be5731d79c81af76826c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94d759835044f71c25d88eb4bd877d14"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a94d759835044f71c25d88eb4bd877d14">while</a> (UART_IsTXBusy(<a class="el" href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">DEBUG_UART_X</a>))</td></tr>
<tr class="separator:a94d759835044f71c25d88eb4bd877d14"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="var-members" name="var-members"></a>
变量</h2></td></tr>
<tr class="memitem:ac1f65ebf7d6f28fb49530ee0095306cb"><td class="memItemLeft" align="right" valign="top">FILE&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#ac1f65ebf7d6f28fb49530ee0095306cb">__stdout</a></td></tr>
<tr class="separator:ac1f65ebf7d6f28fb49530ee0095306cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b71e3c5cd86d6941c8f4a8beb1b354f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a6b71e3c5cd86d6941c8f4a8beb1b354f">PUTCHAR_PROTOTYPE</a></td></tr>
<tr class="separator:a6b71e3c5cd86d6941c8f4a8beb1b354f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0523c05685d59544dca911cb6a3db77d"><td class="memItemLeft" align="right" valign="top">return&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a></td></tr>
<tr class="separator:a0523c05685d59544dca911cb6a3db77d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >调试日志串口打印 </p>
<p >/ </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2022-12-08 lzh the first version 2023-02-23 lzh 优化 SWM34SCE 端口初始化配置流程 </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>/</dd></dl>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 中定义.</p>
</div><h2 class="groupheader">宏定义说明</h2>
<a id="a33047df92b9014ff5cb2536417f22ed3" name="a33047df92b9014ff5cb2536417f22ed3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a33047df92b9014ff5cb2536417f22ed3">&#9670;&#160;</a></span>DEBUG_UART_X</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_UART_X&#160;&#160;&#160;UART0</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>用作调试日志打印的串口号 </p>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00027">27</a> 行定义.</p>

</div>
</div>
<a id="ae74f99a4e9fcb1f759bef9a73b0bf091" name="ae74f99a4e9fcb1f759bef9a73b0bf091"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae74f99a4e9fcb1f759bef9a73b0bf091">&#9670;&#160;</a></span>DEBUG_UART_BAUD</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEBUG_UART_BAUD&#160;&#160;&#160;57600</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>用作调试日志打印的串口波特率（data-8, stop-1, no parity） </p>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00030">30</a> 行定义.</p>

</div>
</div>
<a id="afdd0a75ca080e0e09d20841e7d1d0ea0" name="afdd0a75ca080e0e09d20841e7d1d0ea0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afdd0a75ca080e0e09d20841e7d1d0ea0">&#9670;&#160;</a></span>KEY_INPUT_GPIO</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define KEY_INPUT_GPIO&#160;&#160;&#160;GPIOD</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00034">34</a> 行定义.</p>

</div>
</div>
<a id="ae95dbd4884384af5f7a5f705586b21ad" name="ae95dbd4884384af5f7a5f705586b21ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae95dbd4884384af5f7a5f705586b21ad">&#9670;&#160;</a></span>KEY_INPUT_PIN</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define KEY_INPUT_PIN&#160;&#160;&#160;PIN2</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00035">35</a> 行定义.</p>

</div>
</div>
<a id="ac040eb6679fed6e591776425aa7abd9d" name="ac040eb6679fed6e591776425aa7abd9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac040eb6679fed6e591776425aa7abd9d">&#9670;&#160;</a></span>PUTCHAR_PROTOTYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define PUTCHAR_PROTOTYPE&#160;&#160;&#160;int fputc(int <a class="el" href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a>, FILE *f)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00176">176</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">函数说明</h2>
<a id="ac12e742cf904e08383401dd68a88001b" name="ac12e742cf904e08383401dd68a88001b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac12e742cf904e08383401dd68a88001b">&#9670;&#160;</a></span>uart_port_switch()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void uart_port_switch </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>串口（SWD）端口功能切换 </p>
<dl class="section note"><dt>注解</dt><dd>SWM34SCE_A2 SWD 与串口打印共用同一组端口, 选取 D2 在上电之初用作 串口与SWD功能切换 的输入检测口, 设定一个窗口时间检测 D2 输入是否有效(高电平有效) 若在窗口时限内, D2 输入高电平有效则将 SWD 端口配置为串口日志打印, 否则默认配置为 SWD 功能. </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00043">43</a> 行定义.</p>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c_ac12e742cf904e08383401dd68a88001b_icgraph.png" border="0" usemap="#adev__uart_8c_ac12e742cf904e08383401dd68a88001b_icgraph" alt=""/></div>
<map name="adev__uart_8c_ac12e742cf904e08383401dd68a88001b_icgraph" id="adev__uart_8c_ac12e742cf904e08383401dd68a88001b_icgraph">
<area shape="rect" title="串口（SWD）端口功能切换" alt="" coords="609,31,727,56"/>
<area shape="rect" href="dev__uart_8c.html#aadbe4996756dcc6199bc9ec2e4969993" title="配置串口打印调试日志的端口" alt="" coords="423,31,561,56"/>
<area shape="rect" href="power__manager_8c.html#a0607f7307b006db734b10c8b94bb909e" title="退出睡眠模式后的环境恢复" alt="" coords="224,5,375,31"/>
<area shape="rect" href="dev__uart_8c.html#afd092ef1d390fe16bc90e101bbbca1d8" title="初始化用作打印调试日志的串口" alt="" coords="244,55,355,80"/>
<area shape="rect" href="bsp__init_8c.html#ac1d41f544770121f1cb61aeb64e5807e" title="初始化所有的硬件设备, 该函数配置CPU寄存器和外设的寄存器并初始化一些全局变量(只需要调用一次)" alt="" coords="107,29,173,55"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="104,79,176,104"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,55,56,80"/>
</map>
</div>

</div>
</div>
<a id="aadbe4996756dcc6199bc9ec2e4969993" name="aadbe4996756dcc6199bc9ec2e4969993"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadbe4996756dcc6199bc9ec2e4969993">&#9670;&#160;</a></span>uart_debug_port_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uart_debug_port_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>配置串口打印调试日志的端口 </p>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00090">90</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_cgraph.png" border="0" usemap="#adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_cgraph" alt=""/></div>
<map name="adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_cgraph" id="adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_cgraph">
<area shape="rect" title="配置串口打印调试日志的端口" alt="" coords="5,5,144,31"/>
<area shape="rect" href="dev__uart_8c.html#ac12e742cf904e08383401dd68a88001b" title="串口（SWD）端口功能切换" alt="" coords="192,5,309,31"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_icgraph.png" border="0" usemap="#adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_icgraph" alt=""/></div>
<map name="adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_icgraph" id="adev__uart_8c_aadbe4996756dcc6199bc9ec2e4969993_icgraph">
<area shape="rect" title="配置串口打印调试日志的端口" alt="" coords="423,31,561,56"/>
<area shape="rect" href="power__manager_8c.html#a0607f7307b006db734b10c8b94bb909e" title="退出睡眠模式后的环境恢复" alt="" coords="224,5,375,31"/>
<area shape="rect" href="dev__uart_8c.html#afd092ef1d390fe16bc90e101bbbca1d8" title="初始化用作打印调试日志的串口" alt="" coords="244,55,355,80"/>
<area shape="rect" href="bsp__init_8c.html#ac1d41f544770121f1cb61aeb64e5807e" title="初始化所有的硬件设备, 该函数配置CPU寄存器和外设的寄存器并初始化一些全局变量(只需要调用一次)" alt="" coords="107,29,173,55"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="104,79,176,104"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,55,56,80"/>
</map>
</div>

</div>
</div>
<a id="afd092ef1d390fe16bc90e101bbbca1d8" name="afd092ef1d390fe16bc90e101bbbca1d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd092ef1d390fe16bc90e101bbbca1d8">&#9670;&#160;</a></span>uart_debug_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uart_debug_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化用作打印调试日志的串口 </p>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00103">103</a> 行定义.</p>
<div class="dynheader">
函数调用图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_cgraph.png" border="0" usemap="#adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_cgraph" alt=""/></div>
<map name="adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_cgraph" id="adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_cgraph">
<area shape="rect" title="初始化用作打印调试日志的串口" alt="" coords="5,5,116,31"/>
<area shape="rect" href="dev__uart_8c.html#aadbe4996756dcc6199bc9ec2e4969993" title="配置串口打印调试日志的端口" alt="" coords="164,5,303,31"/>
<area shape="rect" href="dev__uart_8c.html#ac12e742cf904e08383401dd68a88001b" title="串口（SWD）端口功能切换" alt="" coords="351,5,468,31"/>
</map>
</div>
<div class="dynheader">
这是这个函数的调用关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_icgraph.png" border="0" usemap="#adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_icgraph" alt=""/></div>
<map name="adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_icgraph" id="adev__uart_8c_afd092ef1d390fe16bc90e101bbbca1d8_icgraph">
<area shape="rect" title="初始化用作打印调试日志的串口" alt="" coords="224,31,335,56"/>
<area shape="rect" href="bsp__init_8c.html#ac1d41f544770121f1cb61aeb64e5807e" title="初始化所有的硬件设备, 该函数配置CPU寄存器和外设的寄存器并初始化一些全局变量(只需要调用一次)" alt="" coords="107,5,173,31"/>
<area shape="rect" href="userboot_8c.html#a5d51bf8d3184d1c34b5fde41d69b1559" title="UserBoot 功能" alt="" coords="104,55,176,80"/>
<area shape="rect" href="main_8c.html#a840291bc02cba5474a4cb46a9b9566fe" title="C_Main" alt="" coords="5,31,56,56"/>
</map>
</div>

</div>
</div>
<a id="a21296d9c26b359559c9c6c65a7cb1151" name="a21296d9c26b359559c9c6c65a7cb1151"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21296d9c26b359559c9c6c65a7cb1151">&#9670;&#160;</a></span>uart_send_msg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void uart_send_msg </td>
          <td>(</td>
          <td class="paramtype">UART_TypeDef *&#160;</td>
          <td class="paramname"><em>uart_x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>src_buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint32_t&#160;</td>
          <td class="paramname"><em>num_bytes</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>串口发送数据 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">uart_x</td><td>: 串口号 </td></tr>
    <tr><td class="paramname">src_buf</td><td>: 数据源 </td></tr>
    <tr><td class="paramname">num_bytes</td><td>: 数据大小 / Bytes </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>返回值</dt><dd>
  <table class="retval">
    <tr><td class="paramname">/</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>注解</dt><dd>可自定义拓展为 类printf()方法 </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00132">132</a> 行定义.</p>

</div>
</div>
<a id="a89bad4750e10db3e5de90c026aaa01ef" name="a89bad4750e10db3e5de90c026aaa01ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a89bad4750e10db3e5de90c026aaa01ef">&#9670;&#160;</a></span>__asm()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__asm </td>
          <td>(</td>
          <td class="paramtype">&quot;.global __use_no_semihosting\n\t&quot;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>不使用 MicroLIB 时避免使用半主机模式 </p>
<dl class="section note"><dt>注解</dt><dd>#pragma import(__use_no_semihosting) </dd></dl>

</div>
</div>
<a id="a123aeac44456d49a7687b2111946f357" name="a123aeac44456d49a7687b2111946f357"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a123aeac44456d49a7687b2111946f357">&#9670;&#160;</a></span>_sys_exit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _sys_exit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00152">152</a> 行定义.</p>

</div>
</div>
<a id="a1647e9479b4be5731d79c81af76826c5" name="a1647e9479b4be5731d79c81af76826c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1647e9479b4be5731d79c81af76826c5">&#9670;&#160;</a></span>_ttywrch()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void _ttywrch </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00158">158</a> 行定义.</p>

</div>
</div>
<a id="a94d759835044f71c25d88eb4bd877d14" name="a94d759835044f71c25d88eb4bd877d14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94d759835044f71c25d88eb4bd877d14">&#9670;&#160;</a></span>while()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">while </td>
          <td>(</td>
          <td class="paramtype">UART_IsTXBusy(<a class="el" href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">DEBUG_UART_X</a>)&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">变量说明</h2>
<a id="ac1f65ebf7d6f28fb49530ee0095306cb" name="ac1f65ebf7d6f28fb49530ee0095306cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1f65ebf7d6f28fb49530ee0095306cb">&#9670;&#160;</a></span>__stdout</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">FILE __stdout</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00169">169</a> 行定义.</p>

</div>
</div>
<a id="a6b71e3c5cd86d6941c8f4a8beb1b354f" name="a6b71e3c5cd86d6941c8f4a8beb1b354f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b71e3c5cd86d6941c8f4a8beb1b354f">&#9670;&#160;</a></span>PUTCHAR_PROTOTYPE</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PUTCHAR_PROTOTYPE</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>初始值:</b><div class="fragment"><div class="line">{</div>
<div class="line">    UART_WriteByte(<a class="code hl_define" href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">DEBUG_UART_X</a>, <a class="code hl_variable" href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a>)</div>
<div class="ttc" id="adev__uart_8c_html_a0523c05685d59544dca911cb6a3db77d"><div class="ttname"><a href="dev__uart_8c.html#a0523c05685d59544dca911cb6a3db77d">ch</a></div><div class="ttdeci">return ch</div><div class="ttdef"><b>Definition:</b> <a href="dev__uart_8c_source.html#l00186">dev_uart.c:186</a></div></div>
<div class="ttc" id="adev__uart_8c_html_a33047df92b9014ff5cb2536417f22ed3"><div class="ttname"><a href="dev__uart_8c.html#a33047df92b9014ff5cb2536417f22ed3">DEBUG_UART_X</a></div><div class="ttdeci">#define DEBUG_UART_X</div><div class="ttdoc">用作调试日志打印的串口号</div><div class="ttdef"><b>Definition:</b> <a href="dev__uart_8c_source.html#l00027">dev_uart.c:27</a></div></div>
</div><!-- fragment -->
<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00179">179</a> 行定义.</p>

</div>
</div>
<a id="a0523c05685d59544dca911cb6a3db77d" name="a0523c05685d59544dca911cb6a3db77d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0523c05685d59544dca911cb6a3db77d">&#9670;&#160;</a></span>ch</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">return ch</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="dev__uart_8c_source.html">dev_uart.c</a> 第 <a class="el" href="dev__uart_8c_source.html#l00186">186</a> 行定义.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
